import {defineConfig} from 'yp-yapi';

export default defineConfig([
  {
    serverUrl: 'http://yapi.3pvr.com',
    typesOnly: true,
    target: 'typescript',
    reactHooks: {
      enabled: false,
    },
    // prodEnvName: 'production',
    outputFilePath: 'src/core/request/index.d.ts',
    dataKey: 'data',
    projects: [
      {
        token:
          '82c165061546a4d21db84248e63652389039eb332fd3222d3e2e4a8416e516be',
        categories: [
          {
            id: 0,
            getRequestFunctionName(interfaceInfo, changeCase) {
              // 以接口全路径生成请求函数名
              return changeCase.camelCase(interfaceInfo.path);
            },
          },
        ],
      },
    ],
  },
]);
